<?php
session_start();
set_include_path(get_include_path() . PATH_SEPARATOR . '.' . PATH_SEPARATOR . './libs/');
require_once('./libs/classes/userTable.class.php');
require_once('Zend/Db.php');
require_once('./libs/classes/dbconection.class.php');
$dbLink = dbconection::makealink();
$rs = $dbLink->query("select * from user where user_login='{$_POST['username']}'");
if( $apass = $rs->fetchAll() )
{
	if($apass[0]['user_pass']==md5($_POST['password']))
	{
		$_SESSION['userinfo'] =array('id'=>$apass[0]['user_id'],
														'username'=>$_POST['username'],
														'userage'=>$apass[0]['user_age'],
														'userjianjie'=>$apass[0]['user_info']);
		header("location:./blogindex.php");
	}else
	{
		echo "密码不对";
	}
}else
{
	echo "用户不存在";
}
?>